]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
userMenu: Move "Power off" item to the bottom
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 28 Jun 2012 10:22:17 +0000 (12:22 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 29 Jun 2012 09:21:50 +0000 (11:21 +0200)
The current position below "System Settings" is problematic - the
items are unrelated, and misclicks will result in a scary system
modal dialog that has to be cancelled.
Move items around a bit to avoid this problem.

https://bugzilla.gnome.org/show_bug.cgi?id=678887

js/ui/userMenu.js

index 41bf9988966f94e3339dd6d711c5dd6e47530d1e..807e1192f7f2988493eaea191899e9f2c70abda5 100644 (file)
@@ -692,13 +692,6 @@ const UserMenuButton = new Lang.Class({
             this.menu.addMenuItem(item);
         }
 
-        item = new PopupMenu.PopupAlternatingMenuItem(_("Power Off"),
-                                                      _("Suspend"));
-        this.menu.addMenuItem(item);
-        item.connect('activate', Lang.bind(this, this._onSuspendOrPowerOffActivate));
-        this._suspendOrPowerOffItem = item;
-        this._updateSuspendOrPowerOff();
-
         item = new PopupMenu.PopupSeparatorMenuItem();
         this.menu.addMenuItem(item);
 
@@ -712,13 +705,20 @@ const UserMenuButton = new Lang.Class({
         this.menu.addMenuItem(item);
         this._logoutItem = item;
 
-        item = new PopupMenu.PopupSeparatorMenuItem();
-        this.menu.addMenuItem(item);
-
         item = new PopupMenu.PopupMenuItem(_("Lock"));
         item.connect('activate', Lang.bind(this, this._onLockScreenActivate));
         this.menu.addMenuItem(item);
         this._lockScreenItem = item;
+
+        item = new PopupMenu.PopupSeparatorMenuItem();
+        this.menu.addMenuItem(item);
+
+        item = new PopupMenu.PopupAlternatingMenuItem(_("Power Off"),
+                                                      _("Suspend"));
+        this.menu.addMenuItem(item);
+        item.connect('activate', Lang.bind(this, this._onSuspendOrPowerOffActivate));
+        this._suspendOrPowerOffItem = item;
+        this._updateSuspendOrPowerOff();
     },
 
     _updatePresenceStatus: function(item, event) {